package net.guerlab.smart.platform.user.core.exception;

import net.guerlab.spring.commons.exception.AbstractI18nApplicationException;

/**
 * 不允许登录
 *
 * @author guer
 */
public class DisallowLoginException extends AbstractI18nApplicationException {

    private static final long serialVersionUID = 1L;

    private static final String MESSAGE_KEY = "message.exception.user.disallowLogin";

    /**
     * 锁定时间
     */
    private final Long lockTime;

    public DisallowLoginException(Long lockTime) {
        this.lockTime = lockTime;
    }

    @Override
    protected String getKey() {
        return MESSAGE_KEY;
    }

    @Override
    protected Object[] getArgs() {
        return new Object[] { lockTime };
    }
}
